<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
            list-style: none;
            text-decoration: none;
        }
        .box{
            margin:0 auto;
            margin-top:100px ;
            width: 400px;
            height: 400px;
            border:5px solid #000;
            border-radius:50% ;
            background:linear-gradient(to right,#fff 50%,#000 50%);
            position:relative;
            /* 单独定义过渡效果 */

            /* 定义那种元素属性过渡效果 */
            /* transition-property:transform;

            元素过渡需要时间
            transition-duration: 3s;

            元素过渡的排列方式
            transition-timing-function:ease; */


            /* 复合过渡旋转效果  所有元素属性改变需要三秒并平滑过渡*/
            transition: all 3s ease;

            /* 开始旋转时角度为零 */
            transform:rotate(0deg);

        }
        .box:hover{
            /* 旋转过程为720度 */
            transform:rotate(720deg);
        }
        .large:nth-of-type(1){
            width: 200px;
            height: 200px;
            background-color: #fff;
            border-radius: 50%;
            position: absolute;
            top: 0px;
            left: 50%;
            /* 往回平移自身大小的一半才能居中 */
            transform:translate(-50%,0);
        }
        .large:nth-of-type(2){
            width: 200px;
            height: 200px;
            background-color:#000;
            border-radius: 50%;
            position: absolute;
            bottom: 0px;
            left: 50%;
            transform:translate(-50%,0);
        }
        .small{
            width: 50px;
            height: 50px;
            background-color: #000;
            border-radius: 50%;
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%,-50%);
        }
        .large:nth-of-type(2) .small{
            width: 50px;
            height: 50px;
            background-color: #fff;
            border-radius: 50%;
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%,-50%);
        }
        
    </style>
</head>
<body>
    <div class="box">
        <div class="large">
            <div class="small"></div>
        </div>
        <div class="large">
            <div class="small"></div>
        </div>
    </div>
</body>
</html>